<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<h3>
    <a href="{:U(GROUP_NAME.'/Article/scroll')}" class="actionBtn">
        返回列表
    </a>
    编辑滚动信息
</h3>
<form action="{:U(GROUP_NAME.'/Article/scroll_save_edit')}" method="post">
<input type="" name="id" value="{$vo.id}" />
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
       
        <tr>
            <td align="right">时间</td>
            <td>
                <input type="text" name="post[time]" value="{$vo.time}" size="" class="inpMain" /> <span> 格式：2018-2-2</span>
            </td>
        </tr>

        <tr>
            <td align="right">手机号</td>
            <td>
                <input type="text" name="post[mobile]" value="{$vo.mobile}" size="" class="inpMain" /><span> 格式：135****8888</span>
            </td>
        </tr>
        <!--<tr>
            <td align="right">关键字</td>
            <td>
                <input type="text" name="keywords" value="" size="50" class="inpMain" />
            </td>
        </tr>-->
        <tr>
            <td align="right">金额</td>
            <td>
                <input type="text" name="post[money]" value="{$vo.money}" size="" class="inpMain" /> 万元
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input name="submit" class="btn" type="submit" value="提交" />
            </td>
        </tr>
    </table>
</form>
<script>
    //上传缩略图
    $(function (){
        //如果有图片就显示
        if($("#thumbnail").val() != '' && $("#thumbnail").val() != null){
            $("#res_show_img").show();
            $("#res_show_img").html('<img src="'+$("#thumbnail").val()+'" width="150px">');
        }

        $("#Upload_img").click(function (){
            $("#show_Img").html('');
            $("#show_Img").css('display','none');
            $("#imgFile").click();
        });
        $("#imgFile").change(function(){
            $("#Upload_img").html('上传中...');
            var tmp_path = $("#imgFile").val();
            if(tmp_path != '' && tmp_path != null){
                var pic = $('#imgFile')[0].files[0];
                var fd = new FormData();
                fd.append('imgFile', pic);
                $.ajax({
                    url:"__PUBLIC__/main/js/kindeditor/php/upload_json.php",
                    type:"post",
                    dataType:'json',
                    data: fd,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success:function(data){
                        if(data && data.error == '0'){
                            $("#res_show_img").show();
                            var imgurl = data.url;
                            $("#res_show_img").html('<img src="'+imgurl+'" width="150px">');
                            $("#thumbnail").val(imgurl);
                            layer.msg('上传成功');
                        }else{
                            layer.msg('上传出错了...');
                        }
                        $("#Upload_img").html('重新上传');
                    },
                    error:function (){
                        $("#Upload_img").html('重新上传');
                    }
                });
            }
        });
    });
</script>
<script type="text/javascript">		
var ue = UE.getEditor('content', {
    autoHeightEnabled: true,
    autoFloatEnabled: true
});
</script>